import {Graph,Clipboard, Cell} from "@maxgraph/core";

export function copy (graph: Graph) {

    let cells: Cell[] = graph.getSelectionCells();
    Clipboard.copy(graph, cells);
}
//粘贴
export function paste (graph: Graph) {
    Clipboard.paste(graph);
}
//剪切
export function cut (graph: Graph) {
    let cells = graph.getSelectionCells();
    Clipboard.cut(graph, cells);
}
export function deleteNode (graph: Graph) {
    graph.batchUpdate(()=>{
        let cells = graph.getSelectionCells();
        graph.removeCells([...cells]);
    })
}
